#ifndef __INKA_GUI_RENDERWIDGET_H__
#define __INKA_GUI_RENDERWIDGET_H__

#include <GL/glew.h>
#include <Cg/cg.h>

#include <QGLWidget>

#include <gfx/polyrendermesh.h>

namespace inka
{
namespace gui
{

class RenderWidget : public QGLWidget
{
  Q_OBJECT
private:
  gfx::PolyRenderMesh*  _renderMesh;

  CGcontext             _cgContext;
  CGprofile             _cgFragProfile;
  CGprofile             _cgVertProfile;
  CGprogram             _cgFragProgram;
  CGprogram             _cgVertProgram;
  CGparameter           _cgParamWorldMatrix;
  CGparameter           _cgParamViewMatrix;
  CGparameter           _cgParamProjMatrix;
  CGparameter           _cgParamLightPosition;
protected:
  void initializeGL ();
  void resizeGL(int w, int h);
  void paintGL ();

public:
  RenderWidget(QWidget *parent = 0);
  void SetRenderMesh (gfx::PolyRenderMesh* mesh) { _renderMesh = mesh; }

signals:

public slots:

};

}
}
#endif // __INKA_GUI_RENDERWIDGET_H__
